<template>
  <div>

    <h4 style="margin-bottom:10px;">进度</h4>
    <Steps :current=processState :status=row.is_success>

      <Step v-for="(item, index) in arr" :key="index" :title=getTitle(index) :content=item></Step>

    </Steps>

  </div>
</template>
<script>
  export default {
    props: {
      row: Object
    },
    data (){
      return {
        arr : ["简历筛选","笔试","面试","offer","入职"]
      }
    },
    computed : {
      processState: function () {
        return parseInt(this.row.process_state)-1;
      }
    },
    methods: {
      getTitle (index){
        if (index < this.processState){
          return "已完成";
        }else if (index === this.processState){
          if (this.row.is_success === "finish"){
            return "已完成";
          }
          return "进行中";
        }else {
          return "待进行";
        }
      }
    }
  }
</script>
<style>

</style>
